<?php
// 收货
// header("content-type:text/html;charset=utf-8");
include_once("conn.php");
//时区设置为中国
date_default_timezone_set('PRC');

//获取当前时间
$now = date('Y-m-d H:i:s');

$id = $_GET['id'];

$sql = "UPDATE tb_order_info SET o_status = '2', o_endtime = '".$now."' WHERE id = '".$id."'";

$result = mysqli_query($conn, $sql);

if ($result) {
    echo "<script>alert('确认收货成功！');window.location.href='../u_show_order.php';</script>";
} else {
    echo "<script>alert('确认收货失败请重试！');history.go(-1);</script>";
}
